package com.kangyi.user.mapper;

import com.github.pagehelper.Page;
import com.kangyi.dto.NursingHomeFilterDTO;
import com.kangyi.dto.NursingHomePageQueryDTO;
import com.kangyi.entity.NursingHome;
import com.kangyi.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

/**
 * @author Blank
 * @version 1.0
 */
@Mapper
public interface NursingHomeMapper {

    @Select("select * from nursing_home where id = #{id}")
    NursingHome selectById(Integer id);

    NursingHomeDetailVO getNursingHomeById(Integer id);

    List<NursingHomeHotVO> getTopRatedNursingHomes(BigDecimal rating);


    List<NursingHomeRecommendVO> getRecommendedNursingHomes(NursingHomeFilterDTO filter);


    List<NursingHomeRecommendVO> getNewestNursingHomes(@Param("existingIds") List<Integer> existingIds, @Param("remainingCount") int remainingCount);

    List<NursingHomeHotVO> getNewestHotNursingHomes(@Param("existingIds")List<Integer> existingIds, @Param("remainingCount")int remainingCount);

    NursingHomeListFavoriteVO getNursingHomeDetailsById(Integer nursingHomeId);


    Page<NursingHomeListFavoriteVO> pageQuery(NursingHomePageQueryDTO nursingHomePageQueryDTO);
}
